<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="utf-8"%>
<!-- header -->
<jsp:include page="../include/header.jsp"></jsp:include>
<header id="header">
	<!--/header-middle-->
	<jsp:include page="../include/header_middle.jsp"></jsp:include>
	<!--header-bottom-->
	<jsp:include page="../include/header_bottom.jsp"></jsp:include>
	<!--/header-bottom-->
</header>
<!--/header-->

<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>

<script type="text/javascript">

	$(function(){
		var result = '';
		if (location.search) {
			result = location.search.split('?')[1];
			result = result.split('=')[1];
			if (result == 0) {
				alert("아이디가 없거나 비밀번호가 틀렸습니다.");
			}
			else if (result == 1){
				alert("회원가입을 축하드립니다.");
			}
			location.replace("loginform");
		}		
	});

	function form_check() {

		if ($('#member_id').val() == "") {
			alert("아이디를 입력해주세요");
			return;
		}
		if ($('#member_password').val() == "") {
			alert("패스워드를 입력해주세요");
			return;
		}

		f.action = 'loginaction';
		f.submit();

	}
</script>


<!-- action 값을 저장하기위한 input -->

<section id="form"
	style="display: block; margin-bottom: 120px; margin-top: 0px; overflow: hidden;">
	<!--form-->
	<div class="container">
		<div class="row">
			<div class="col-sm-4 col-sm-offset-1"
				style="width: 100%; padding-left: 30%; padding-right: 40%;">
				<div class="login-form">
					<!--login form-->
					<h2>로그인</h2>
					<form name="f" method="post">
						<input type="text" name="member_id" id="member_id" placeholder="아이디" />
						<input type="password" name="member_password" id="member_password"	placeholder="패스워드" />
						<button onclick="javascript:form_check()" class="btn btn-default">로그인</button>
						
						<!-- 
						@RequestParam("value")로 값을 받고 싶을때
						"logout" param 안넘겨주면 Anotation 에서 오류나서 히든으로 넘겨줘야됨
						<input type="hidden" name="logout" id="logout" value="0">
						-->
						
					</form>
				</div>
				<!--/login form-->
			</div>
		</div>
	</div>
</section>
<!--/form-->
<br/><br/><br/><br/><br/><br/><br/>
<!--Footer-->
<jsp:include page="../include/footer.jsp"></jsp:include>
<!--/Footer-->


